package cn.wolfcode.luowowo.common.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 攻略评论
 */
@Setter
@Getter
@Document("shop_comment")
public class ShopComment implements Serializable {
    public static final int SHOP_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int SHOP_COMMENT_TYPE = 1; //评论的评论
    @Id
    private String id;  //mongodb默认的是id
    private Long detailId;  //攻略(明细)id
    private String detailTitle; //攻略标题
    private int type = SHOP_COMMENT_TYPE_COMMENT; //评论类别

    private Long userId;    //用户id
    private String username;  //用户名
    private String city;
    private int level;        //用户级别
    private String headUrl;     //用户头像


    private Date createTime;    //创建时间
    private String content;      //评论内容
    private int thumbupnum;     //点赞数
    private Integer rank_star;     //星星数
    private List<Long> thumbuplist = new ArrayList<>();  //点赞的用户id集合

    private String picUrl;//图片/ba544f5c-e1ad-4d16-a5e7-18b5394fd708.png,/0b852c0a-4526-454d-b552-98d2c7863654.jpg
    private List<String> pics = new ArrayList<>();  //图片

    private ShopComment refComment;  //关联的评论


}
